<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2016/12/21
  Time: 21:32
  To change this template use File | Settings | File Templates.
--%>
<%

  System.out.println("----------------");
  Cookie[] cookies=request.getCookies();
  if(cookies==null){
    System.out.println("cookie is null.");
    return;
  }else {
    System.out.println("cookie not is null");
  }
  for(Cookie c:cookies){
    System.out.println(c.getName()+"-----"+c.getValue());
    if(c.getName().equals("b")){
      System.out.println("b----");
      Cookie co=new Cookie("b","20");
      response.addCookie(co);
    }else if(c.getName().equals("c")){
      System.out.println("c----");
      c.setMaxAge(-1);
    }

  }
  Cookie cookie=new Cookie("name","zlf");
  response.addCookie(cookie);
%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title></title>
</head>
<body>
  ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
</body>
</html>
